import 'package:flutter/material.dart';

class LoginPage extends StatefulWidget {

  @override
  State<StatefulWidget> createState() {
    return LoginState();
  }

}

class LoginState extends State<LoginPage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Color(0xff313131),
        title: Text(
            "登录",
          style: TextStyle(
            color: Colors.white
          ),
        ),
        actions: <Widget>[
          Container(
            alignment: Alignment.center,
            padding: EdgeInsets.only(right: 20),
            child: Text(
              "注册",
              textAlign: TextAlign.center,
              style: TextStyle(
                  color: Color(0xffAD8A54),
                fontSize: 20
              ),
            )
          )
        ],
      ),
      body: Padding(
        padding: EdgeInsets.symmetric(horizontal: 15),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.end,
          children: <Widget>[
            GestureDetector(
              onTap: () {

              },
              child: Padding(
                padding: EdgeInsets.only(top: 10, bottom: 3),
                child: Text(
                  "找回密码",
                  style: TextStyle(
                      color: Color(0xffAE8C57),
                      fontSize: 12
                  ),
                )
              )
              ),
            Padding(
                padding: EdgeInsets.only(bottom: 10),
              child: TextField(
                keyboardType: TextInputType.number,
                decoration: InputDecoration(
                    labelText: "手机号码",
                  border: OutlineInputBorder()
                ),
              )
            ),
            TextField(
              // 隐藏输入的文字
              obscureText: true,
              decoration: InputDecoration(
                labelText: "密码",
                border: OutlineInputBorder()
              ),
            ),
            Row(
              mainAxisSize: MainAxisSize.max,
              children: <Widget>[
                Expanded(
                    child: Container(
                        height: 50,
                        margin: EdgeInsets.symmetric(vertical: 10),
                        child: FlatButton(
                            color: Color(0xffAD8A54),
                            onPressed: () {

                            },
                            child: Text(
                              "登录",
                              textAlign: TextAlign.center,
                              style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 18
                              ),
                            )
                        )
                    )
                )
              ],
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                FlatButton(
                    child: Column(
                      children: <Widget>[
                        Image.asset('image/sina_48x48_@2x.png', width: 50, height: 50,),
                        Padding(padding: EdgeInsets.only(top: 10)),
                        Text("微博登录")
                      ],
                    ),
                    onPressed: () {

                    }
                ),
                FlatButton(
                    child: Column(
                      children: <Widget>[
                        Image.asset('image/weixin_48x48_@2x.png', width: 50, height: 50,),
                        Padding(padding: EdgeInsets.only(top: 10)),
                        Text("微信登录")
                      ],
                    ),
                    onPressed: () {

                    }
                ),
                FlatButton(
                    child: Column(
                      children: <Widget>[
                        Image.asset('image/qqLogin_48x48_@2x.png', width: 50, height: 50,),
                        Padding(padding: EdgeInsets.only(top: 10)),
                        Text("QQ登录")
                      ],
                    ),
                    onPressed: () {

                    }
                ),
              ],
            )
          ],
        )
      ),
    );
  }

}